﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using eDepotSystem;

namespace eDepotSystemConsole
{
    static class SysUI
    {
        static public string GetLine()
        {
            throw new NotImplementedException();
        }
        static public void PutLine()
        {
            throw new NotImplementedException();
        }
        /*
         * Displays and returns the choice from a menu.
         */
        static public int Menu(List<string> items)
        {
            throw new NotImplementedException();
        }

        /*
         * Takes care of the user interaction for getting and
         * displaying a driver.
         */
        static public void LocateDriver(string driverName){
            Console.WriteLine("LOCATE DRIVER");
            Console.WriteLine("=============");
            Console.WriteLine();
            string inp = Console.ReadLine();
            Driver d = UserBase.GetDriver(inp.Trim());
            if (d != null)
            {
                Console.WriteLine("DRIVER DETAILS");
                Console.WriteLine("==============");
                Console.WriteLine();
                Console.WriteLine("Name: " + d.GetUserName());
                if (d.GetDepotName() != null)
                {
                    Console.WriteLine("Depot: " + d.GetDepotName());
                }
                else
                {
                    Console.WriteLine("No Depot Assigned!");
                }
            }
            else
            {
                Console.WriteLine("No Such Driver: " + inp);
            }
            /*
             * Make sure there is one blank line at the end.
             */
            Console.WriteLine();
        }
    }
}
